<?php
class Slider_home_model extends CI_Model{
    
    // slider
    public function join_tbls()
    {
        $sql = "SELECT *
                 FROM tbl_slider
                     JOIN tbl_product
                         ON tbl_product.pro_id = tbl_slider.pro_id
                     JOIN tbl_pro_img
                         ON tbl_pro_img.pro_id = tbl_product.pro_id
                WHERE pro_img_main = 1";
        $query = $this->db->query($sql);
        return $result = $query->result_array(); 
    }
}
